//
//  DDUserInfoService.h
//  DingDongZP
//
//  Created by Ray on 16/4/12.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

#import "DDBaseService.h"
#import "DDUserInfoModel.h"

#define kActivitySignIn      @"signin"
#define kActivityCommunicate @"communicate"
#define kActivityView        @"view"
#define kActivityShare       @"share"

@interface DDUserInfoService : DDBaseService

- (void)queryUserInfo:(void (^)(DDUserInfoModel *model))callback;

/**
 *  @brief 取用户信息
 *
 *  @param fresh    yes时只取网络数据，为no时有本地取本地，否则取网络
 *  @param callback 回调方法
 */
- (void)queryUserInfoWithFresh:(BOOL)fresh callback:(void (^)(DDUserInfoModel *model))callback;

- (void)updateName:(NSString *)name callback:(void (^)(BOOL succ))callback;
/// 一男二女三保密
- (void)updateSex:(NSInteger)name callback:(void (^)(BOOL succ))callback;

/// year:
/// 1: 应届，2：一年以下，3：1-3年，4：3-5，5：5-10年，6：10以上
- (void)updateWorkyear:(NSString *)name callback:(void (^)(BOOL succ))callback;

- (void)updateWxNumber:(NSString *)name callback:(void (^)(BOOL succ))callback;

- (void)uploadLogo:(UIImage *)logo callback:(void (^)(BOOL succ))callback;
+ (void)uploadLogo:(UIImage *)logo callback:(void (^)(BOOL succ))callback;

/**
 *  增加活跃度
 *
 *  @param activeType 活跃度类型，见上方宏定义
 *  @param callback   回调，成功返回新的活跃度，失败返回错误信息
 */
- (void)addActivityWithType:(NSString *)activeType callback:(void (^)(BOOL succ, id data))callback;

/**
 *  设为单例方便使用了
 *
 *  @return
 */
+ (instancetype)sharedService;

@end
